#!/usr/bin/env python
import time
#setup env
import os
home = os.path.abspath(os.path.dirname(__file__) or '.')
import sys
sys.path.append('%s/../lib' % home)

import logging
format = '%(asctime)s [%(levelname)s] +%(lineno)d %(filename)s |> %(message)s'
logging.basicConfig(level=logging.DEBUG, format=format)

from shortcut import config as C
from core.shortcut_services_model import model as M

from core.service_discover import discover_services_in_directory

C.init()

service_directories = [
    'core',
    'ext',
    'contrib',
]

if __name__ == '__main__':
    for directory in service_directories:
        discover_services_in_directory(directory)

    import gtk
    gtk.main()
    #line = sys.stdin.readline()
    #logging.info('Line from stdin: %s' % line)
